#pragma once

#include <ros/ros.h>

#include "kinematic_base.h"
#include "kinematic_normal.h"

namespace actuator
{
class ActuatorMain
{
public:
    ActuatorMain(ros::NodeHandle &nh, ros::NodeHandle &private_nh, std::string param_file, std::string log_path);
    ~ActuatorMain();

    void Init(std::string file);

    void ActuatorSendHandler(AMRSendCmd &amr_cmd, AMRReceiveState &amr_state, ControlVelocity &ctrl_velocity);
    void ActuatorRecvHandler(AMRSendCmd &amr_cmd, AMRReceiveState &amr_state, VehicleVelocity &vehicle_velocity);

private:
    ros::NodeHandle nh_;
    ros::NodeHandle private_nh_;
    common_lib::Common com_;

    // kinematic model
    std::shared_ptr<actuator::AMRKinematicModeBase> ptr_kinematic_;
    std::string param_file_;
    std::string log_path_;

    void InitLog();
};
}